﻿#include "MainWidget.h"

MainWidget::MainWidget(QWidget *parent) : ZFramelessWidget(parent)
{
    init();
}

void MainWidget::init()
{
    resize(500, 500);

    QSharedPointer<ZShadowEffect> shadow_effect(new ZShadowEffect);
    shadow_effect->setShadowWidth(10);
    shadow_effect->setShadowOffset(QPoint(0, 0));
    shadow_effect->setShadowColor(Qt::black);
    applyShadowEffect(shadow_effect);

    QSharedPointer<ZRoundEffect> round_effect(new ZRoundEffect);
    round_effect->setXRadius(3);
    round_effect->setYRadius(3);
    applyRoundEffect(round_effect);

    QSharedPointer<ZBorderEffect> border_effect(new ZBorderEffect);
    border_effect->setBorderWidth(2);
    border_effect->setBorderColor(Qt::gray);
    border_effect->setBorderStyle(Qt::SolidLine);
    applyBorderEffect(border_effect);
}
